package stud.mpgame.flash.net.description;

import flash.utils.IDataOutput;

import stud.mpgame.network.MessageDescription;

import stud.mpgame.flash.net.userobject.LoginUserObject;

/**
 * ...
 * @author pavel[f.pavel91@gmail.com]
 */
class LoginMessageDescription extends MessageDescription {
	
	private static var ID:Int = IDescriptionManager.LOGIN_MESSAGE_DESCRIPTION;

    private static var LOGIN_USER_OBJECT_ID:Int = 1;
	
	private static var instance:LoginMessageDescription = null;

    public override function getID():Int {
        return ID;
    }
	
	public function new() {
		super();
		this.registerUserObject(LOGIN_USER_OBJECT_ID, LoginUserObject);
	}

    public static function getInstance():LoginMessageDescription {
        if(instance == null){
            instance = new LoginMessageDescription();
        }
        return instance;
    }
	
}